/*------------------------------------------------------------------------------
 *
 * CFiniteStateTransducer
 * 
 *----------------------------------------------------------------------------*/

#ifndef   CFINITESTATETRANSDUCER_HPP
#define   CFINITESTATETRANSDUCER_HPP

#include <vector>

class CFiniteStateTransducer
{
    public:
        CFiniteStateTransducer( unsigned int num_input_symbols,
                                unsigned int num_output_sumbols,
                                unsigned int num_states );
        CFiniteStateTransducer( const char* filename );
        CFiniteStateTransducer( const CFiniteStateTransducer *transducer );
        ~CFiniteStateTransducer();

        void print() const;

        void generateRandomProbability();
        void generateFromInputSymbols( const CFiniteStateTransducer *transducer );
        void generateFromOutputSymbols( const CFiniteStateTransducer *transducer );

        void normalizeUsingJointProbability();
        void normalizeUsingInputValues();
        void normalizeUsingOutputValues();

        unsigned int numInputSymbols() const;
        unsigned int numOutputSymbols() const;
        unsigned long totalSymbols() const;
        unsigned int numStates() const;

        double getProbability( const std::vector<unsigned int> &inputSymbolsList,
                               const std::vector<unsigned int> &outputSymbolsList ) const;

    private:
        struct prv_finiteStateTransducer_t *m_data;
};

#endif
